Xbasic
INET::SFTPDeleteFile Method
Syntax
.DeleteFile as L (TargetFile as C)
Arguments
- TargetFileCharacter
The target file you wish to delete. This can be the full path to the file (such as /downloads/target.txt).
Returns
- resultLogical
Returns .t. if the operation succeed. Otherwise, returns .f.. If an error occurred, the INET::FTP CallResult property will contain more information.
Description
Delete a file from an FTP server using SSH over FTP.
Example
dim sftp as INET::SFTP
sftp.UserName = "Fred"
sftp.Password = "Secret"
sftp.ServerHost = "ftp.myserver.com"
if sftp.DeleteFile("target.csv") <> .t.
' error
msg = sftp.callResult.error
...
end if